<template>
	<view>
		<!-- <u-navbar title="会员卡" title-color="#333333" title-size="34"></u-navbar> -->
		<view class="container">
			<view class="list">
				<!-- bg1 bg2 bg3 -->
				<view class="item" v-for="(item,index) in cardList" :key="item+index">
					<view class="text">
						<view class="ti">易购卡</view>
						<view class="num">No.{{item.cardNo}}</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import * as api from '@/api/user/index.js';
	export default {
		data() {
			return {
				parmas:{
					pageSize:20,
					pageNum:1
				},
				cardList:[]
			}
		},
		methods: {
			async getCardList(){
				try{
					const res = await api.getCardList(this.parmas);
					console.log(res.data)
					this.cardList = res.data.obj;
					uni.stopPullDownRefresh();
					this.utils.toast(res.data.msg)
				}catch(error){
					console.log(error)
					this.utils.toast(error.data.msg)
				}
			}
		},
		onLoad(option){
			
		},
		onShow() {
			this.getCardList();
		},
		onReachBottom() {
			
		},
		onPullDownRefresh() {
			this.getCardList();
		}
	}
</script>

<style lang="scss">
@import './index.scss';
</style>
